import { useAppStoreHook } from "@/store/modules/refresh";
import { type IrefreshFunc } from "@/store/modules/types";

const appStore = useAppStoreHook();
// 设置页面的刷新方法
export const setRefrshFunc = (func: IrefreshFunc) => {
  console.log("Set RefrshFunc...");
  appStore.setRefrshFunc(func);
};

// 清除页面的刷新方法
export const clearRefrshFunc = () => {
  console.log("Clear RefrshFunc...");
  appStore.clearRefrshFunc();
};

// 页面刷新方法
export const handleRefresh = () => {
  console.log("Handle RefrshFunc...");
  appStore.refreshPage();
};
